package com.wing.product.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.product.model.entity.ProductPackLabel;
import com.wing.product.model.response.ProductPackLabelVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 产品包装条码-Dao
 *
 * @author
 */
@Mapper
public interface ProductPackLabelDao extends BaseMapper<ProductPackLabel> {

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<ProductPackLabelVO> list4app(@Param("params") Map<String, Object> params);

    /**
     * 分页列表-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    List<ProductPackLabelVO> list4app(@Param("page") Page<ProductPackLabelVO> page, @Param("params") Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    ProductPackLabelVO get4appById(Long id);

    ProductPackLabelVO getProductPackLabelVOList(@Param("code") String code);

    public Page<ProductPackLabelVO> getInventoryPackLabelPageList (IPage<ProductPackLabelVO> page, @Param("ew") QueryWrapper<ProductPackLabelVO> queryWrapper);

    ProductPackLabelVO getPackLabelVOByCode(@Param("planId") Long planId,@Param("code") String code,@Param("warehouseId") Long warehouseId);

    ProductPackLabelVO getByCode(@Param("code") String code,@Param("loadPlanId") Long loadPlanId);

}
